package xiegd.study.proxy;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import xiegd.study.proxy.extend.Child;

/**
 * @Author: xieguangda
 * @Description:
 * @Date: 2023/9/20 10:03
 */
public class AnnotationLogTest {

    @Test
    public void tes33(){
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AnnotationLog.class);

//        MyBean myBean = (MyBean)applicationContext.getBean("myBean");
//
//        myBean.study("我是第一个");
//
//        myBean.study2("我是第二个");
//
//       // System.out.println("我是值啊:" + myBean.getTeacher());
//        MyBean myBeanSON = (MyBean)applicationContext.getBean("myBeanSon");
//
//        myBeanSON.study("我是儿子");

        Child g = (Child)applicationContext.getBean("grandchild");
        g.request();
    }
}
